package com.daffodil.storage.model;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.multipart.MultipartFile;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

/**
 * -对象存储请求参数
 * @author yweijian
 * @date 2023年5月16日
 * @version 2.0.0
 * @description
 */
@Data
@Builder
@ApiModel("对象存储请求参数")
public class StorageRequest {

    @ApiModelProperty(hidden = true)
    private HttpServletRequest request;

    @ApiModelProperty(name = "allow", value = "限制规则条件", hidden = true)
    private MediaAllow allow;

    @ApiModelProperty(name = "folder", value = "业务文件夹名称")
    private String folder;

    @ApiModelProperty(name = "key", value = "对象存储键值，未指定则按应用日期格式默认规则存储")
    private String key;

    @ApiModelProperty(name = "metadata", value = "对象元数据")
    private Map<String, String> metadata;

    @ApiModelProperty(name = "source", value = "远程网络地址")
    private String source;

    @ApiModelProperty(name = "file", value = "存储对象")
    private MultipartFile file;

}
